import request from '@/router/axios';

export const getList = (supplierNo,current, size, params) => {
  return request({
    url: '/api/blade-supplier-management/supplierinfo/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
      supplierNo,
      state: '1'
    }
  })
}

export const getSupplierProperty = (id,property) => {
  return request({
    url: '/api/blade-portal/supplierchange/getSupplierProperty',
    method: 'get',
    params: {
      id,
      property
    }
  })
}

export const saveChangeInfo = (data) => {
  return request({
    url: '/api/blade-portal/supplierchange/save',
    method: 'post',
    data: data
  })
}

export const getSupplierChangeHistory = (supplierNo) => {
  return request({
    url: '/api/blade-portal/supplierchange/history',
    method: 'get',
    params: {
      supplierNo
    }
  })
}

export const getSupplierChangeDetail = (id) => {
  return request({
    url: '/api/blade-portal/supplierchange/historyDetail',
    method: 'get',
    params: {
      id
    }
  })
}

export const submitReview = (id) => {
  return request({
    url: '/api/blade-portal/supplierchange/start-process',
    method: 'get',
    params: {
      id
    }
  })
}
export const getSupplierInfo = (id) => {
  return request({
    url: '/api/blade-portal/supplierchange/historyReview',
    method: 'get',
    params: {
      id
    }
  })
}

// 删除
export const remove = (ids) => {
  return request({
    url: '/api/blade-portal/supplierchange/remove',
    method: 'post',
    params: {
      ids
    }
  })
}
